package com.example.demo.mq.bo;

import com.example.demo.paymqnotification.entity.PayMqNotificationRecord;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class ScoreMqBo implements Serializable {
    private String orderNo;

    private String userId;

    private BigDecimal price;

    private int status;

    public static ScoreMqBo buildFromPayMqNotificationRecord(PayMqNotificationRecord payMqNotificationRecord) {
        ScoreMqBo scoreMqBo = new ScoreMqBo();
        BeanUtils.copyProperties(payMqNotificationRecord, scoreMqBo);
        return scoreMqBo;
    }
}
